package com.ruoyi.ftrl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ftrl.mapper.StationRecordsMapper;
import com.ruoyi.ftrl.domain.StationRecords;
import com.ruoyi.ftrl.service.IStationRecordsService;

/**
 * 换热站维保记录信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-24
 */
@Service
public class StationRecordsServiceImpl implements IStationRecordsService 
{
    @Autowired
    private StationRecordsMapper stationRecordsMapper;

    /**
     * 查询换热站维保记录信息
     * 
     * @param id 换热站维保记录信息主键
     * @return 换热站维保记录信息
     */
    @Override
    public StationRecords selectStationRecordsById(Long id)
    {
        return stationRecordsMapper.selectStationRecordsById(id);
    }

    /**
     * 查询换热站维保记录信息列表
     * 
     * @param stationRecords 换热站维保记录信息
     * @return 换热站维保记录信息
     */
    @Override
    public List<StationRecords> selectStationRecordsList(StationRecords stationRecords)
    {
        return stationRecordsMapper.selectStationRecordsList(stationRecords);
    }

    /**
     * 新增换热站维保记录信息
     * 
     * @param stationRecords 换热站维保记录信息
     * @return 结果
     */
    @Override
    public int insertStationRecords(StationRecords stationRecords)
    {
        stationRecords.setCreateTime(DateUtils.getNowDate());
        return stationRecordsMapper.insertStationRecords(stationRecords);
    }

    /**
     * 修改换热站维保记录信息
     * 
     * @param stationRecords 换热站维保记录信息
     * @return 结果
     */
    @Override
    public int updateStationRecords(StationRecords stationRecords)
    {
        stationRecords.setUpdateTime(DateUtils.getNowDate());
        return stationRecordsMapper.updateStationRecords(stationRecords);
    }

    /**
     * 批量删除换热站维保记录信息
     * 
     * @param ids 需要删除的换热站维保记录信息主键
     * @return 结果
     */
    @Override
    public int deleteStationRecordsByIds(Long[] ids)
    {
        return stationRecordsMapper.deleteStationRecordsByIds(ids);
    }

    /**
     * 删除换热站维保记录信息信息
     * 
     * @param id 换热站维保记录信息主键
     * @return 结果
     */
    @Override
    public int deleteStationRecordsById(Long id)
    {
        return stationRecordsMapper.deleteStationRecordsById(id);
    }
}
